package task;

import java.util.Scanner;

public class Task4_2 {
    public static void main(String[] args) {

        String sr = "12345";
        int counter = 3;
        while(counter != 0){
            Scanner input = new Scanner(System.in);
            String password = input.nextLine();
            if(password.equals(sr)){
                System.out.println("答对了！");
                return ;
            }
            else{
                counter --;
                System.out.println("输入错误，还有" + counter + "次机会");
            }
        }


    }

}
